package com.jxin.mall.weixin.domain.exception;

import cn.hutool.core.util.StrUtil;

/**
 * 路由返回消息异常类
 * @author  蔡佳新
 * @version 1.0
 * @since   jdk 1.8
 */
public class RouteOutMsgException extends RuntimeException{
    private static final long serialVersionUID = -5075729295073524660L;

    public RouteOutMsgException(Throwable throwable) {
        super(StrUtil.format("{}: {}", throwable.getClass().getSimpleName(), throwable.getMessage()), throwable);
    }

    public RouteOutMsgException(String messageTemplate, Object... params) {
        super(StrUtil.format(messageTemplate, params));
    }

    public RouteOutMsgException(Throwable throwable, String messageTemplate, Object... params) {
        super(StrUtil.format(messageTemplate, params), throwable);
    }
}
